<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
        #nav{
            width: 85%;
            height: 50px;
            margin: 0 auto;
            border-radius: 4px;
        }

        li{
            list-style: none;
        }

        #nav > ul{
            padding: 0;
            display: flex;
            height: 100%;
            justify-content: space-between;
            border-bottom: 2px solid silver ;
        }
        #nav > ul > li{
            position: relative;
            display: block ;
            width: 16%;
            height: 100%;
            text-align: center;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
        }
        #nav > ul > li > span{
            display: inline-block;
            text-align: center;
            line-height: 50px;
        }

        #nav > ul > li > .triangle{
            width: 0;
            height: 0;
            position: absolute;
        }

        #nav > ul > li > .top{
            border-bottom: 0px solid transparent;
            border-left: 73px solid transparent;
            border-right: 73px solid transparent;
            border-top: 8px solid cyan;
        }

        #nav > ul > li > .bottom{
            border-bottom: 8px solid cyan;
            border-left: 73px solid transparent;
            border-right: 73px solid transparent;
            border-top: 0px solid transparent;
            top: 42px;
        } 

        #nav > ul > li:hover{
            border: 2px solid silver;
            background-color: white;
            border-bottom: none;
        }

        #nav > ul > li > ul{
            padding: 0;
            border: 2px solid silver;
            border-top: none;
            position: absolute;
            width: 100%;
            height: 80px;
            left: -2px;
            display: none;
            border-bottom-left-radius: 10px;
            border-bottom-right-radius: 10px;
        }

        #nav > ul > li > ul > li{
            height: 40px;
            line-height: 40px;
            border-radius: 5px;
        }

        #nav > ul > li > ul > li:hover{
            background-color: thistle;
        }

        #nav > ul > li:hover > ul{
            display: block;
        }
    </style>
</head>
<body>
    <div id="nav">
        <ul>
            <li>
                <!-- <div class="triangle top"></div> -->
                <span>home</span>
                <!-- <div class="triangle bottom"></div> -->
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
            <li>
                <span>导航1</span>
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
            <li>
                <span>导航2</span>
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
            <li>
                <span>导航3</span>
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
            <li>
                <span>导航4</span>
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
            <li>
                <span>导航5</span>
                <ul class="sec">
                    <li>子1</li>
                    <li>子2</li>
                </ul>
            </li>
        </ul>
    </div>
    
    <a href="./reg.html">注册</a>
    <a href="./login.html">登录</a>
</body>
</html>